package com.main.hotel.repository;


import com.main.hotel.entity.CustomerToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface CustomerTokenRepository extends JpaRepository<CustomerToken, Integer>,
  JpaSpecificationExecutor<CustomerToken> {
  @Query(value = "select * from customer_token where customer_id= ?1", nativeQuery = true)
  CustomerToken findByCustomerId(int customer_id);
}
